package tech.aistar.corejava.day11.homework;

import java.util.List;

/**
 * @author success
 * @version 1.0
 * @description:本类用来演示:测试类
 * @date 2019/7/30 0030
 */
public class TestBookDao {
    public static void main(String[] args) {
        IBookDao bookDao = new BookDaoImpl();

        //调用增加方法
        Book b = new Book(7,"book","book",900);

        bookDao.save(b);

        //查询
        //List<Book> books = bookDao.findByBook("义");
        //输出 - 集合的输出方式
        //books.forEach(System.out::println);

        //根据id进行删除
      //  bookDao.delById(1);

        //根据价格删除
        bookDao.delByPrice(100.0);

        //books.forEach(System.out::println);
        //System.out.println(books);
        bookDao.findByBook(null).forEach(System.out::println);
    }
}
